GDB: Allow read of BaseCamp files, too.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 23 Jun 2009 03:29:25 +0000 (03:29 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 23 Jun 2009 03:29:25 +0000 (03:29 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3669 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/gdb.c

index 129951cf61515a568cde173a17f4b29b83f4687b..34acd2c47d05f0693f523571d5f4e7e17374ca29 100644 (file)
 
 /*******************************************************************************/
 
-/* static char gdb_release[] = "$Revision: 1.68 $"; */
-static char gdb_release_date[] = "$Date: 2009-02-11 12:49:27 $";
+/* static char gdb_release[] = "$Revision: 1.69 $"; */
+static char gdb_release_date[] = "$Date: 2009-06-23 03:29:25 $";
 
 static gbfile *fin, *fout, *ftmp;
 static int gdb_ver, gdb_category, gdb_via, gdb_roadbook;
@@ -432,7 +432,7 @@ read_file_header(void)
        }
 
        i = FREAD_STR(buf);
-       is_fatal((i != 9) || (strcmp(buf, "MapSource") != 0), "Invalid header!");
+       is_fatal(!(((i == 9) && (strcmp(buf, "MapSource") == 0)) || ((i == 8) && (strcmp(buf, "BaseCamp") == 0))), "Invalid header!");
 }
 
 /*-----------------------------------------------------------------------------*/